package com.yw.common.core.util;

import com.yw.common.core.db.DBConnectionFactory;
import com.yw.common.core.db.IDBConnection;

/**
 * 数据库工具
 * @author aoshiguchen
 * @time 2015-09-10
 */

public class DbUtil {
	private static IDBConnection connection = null;

	public static IDBConnection getDBConnection(){
		if(null == connection){
			switch (ConstantUtil.getDbType()) {
			case MYSQL:
				
				break;
				
			case SQLSERVER:
				connection = DBConnectionFactory.createSqlServerConnection();
				break;
			}
		}
		
		return connection;
	}
	
}
